\(\int \sec ^2(a+b x) \tan ^2(a+b x) \, dx\) [54]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 15 \[ \int \sec ^2(a+b x) \tan ^2(a+b x) \, dx=\frac {\tan ^3(a+b x)}{3 b} \]

[Out]

1/3*tan(b*x+a)^3/b

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2687, 30} \[ \int \sec ^2(a+b x) \tan ^2(a+b x) \, dx=\frac {\tan ^3(a+b x)}{3 b} \]

[In]

Int[Sec[a + b*x]^2*Tan[a + b*x]^2,x]

[Out]

Tan[a + b*x]^3/(3*b)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2687

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int x^2 \, dx,x,\tan (a+b x)\right )}{b} \\ & = \frac {\tan ^3(a+b x)}{3 b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 15, normalized size of antiderivative = 1.00 \[ \int \sec ^2(a+b x) \tan ^2(a+b x) \, dx=\frac {\tan ^3(a+b x)}{3 b} \]

[In]

Integrate[Sec[a + b*x]^2*Tan[a + b*x]^2,x]

[Out]

Tan[a + b*x]^3/(3*b)

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.47

method result size
derivativedivides \(\frac {\sin ^{3}\left (b x +a \right )}{3 b \cos \left (b x +a \right )^{3}}\) \(22\)
default \(\frac {\sin ^{3}\left (b x +a \right )}{3 b \cos \left (b x +a \right )^{3}}\) \(22\)
norman \(-\frac {8 \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{3 b \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )^{3}}\) \(32\)
risch \(-\frac {2 i \left (3 \,{\mathrm e}^{4 i \left (b x +a \right )}+1\right )}{3 b \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )^{3}}\) \(33\)
parallelrisch \(-\frac {8 \left (\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{3 b \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )^{3} \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )+1\right )^{3}}\) \(43\)

[In]

int(sec(b*x+a)^4*sin(b*x+a)^2,x,method=_RETURNVERBOSE)

[Out]

1/3/b*sin(b*x+a)^3/cos(b*x+a)^3

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 29 vs. \(2 (13) = 26\).

Time = 0.27 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.93 \[ \int \sec ^2(a+b x) \tan ^2(a+b x) \, dx=-\frac {{\left (\cos \left (b x + a\right )^{2} - 1\right )} \sin \left (b x + a\right )}{3 \, b \cos \left (b x + a\right )^{3}} \]

[In]

integrate(sec(b*x+a)^4*sin(b*x+a)^2,x, algorithm="fricas")

[Out]

-1/3*(cos(b*x + a)^2 - 1)*sin(b*x + a)/(b*cos(b*x + a)^3)

Sympy [F]

\[ \int \sec ^2(a+b x) \tan ^2(a+b x) \, dx=\int \sin ^{2}{\left (a + b x \right )} \sec ^{4}{\left (a + b x \right )}\, dx \]

[In]

integrate(sec(b*x+a)**4*sin(b*x+a)**2,x)

[Out]

Integral(sin(a + b*x)**2*sec(a + b*x)**4, x)

Maxima [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.87 \[ \int \sec ^2(a+b x) \tan ^2(a+b x) \, dx=\frac {\tan \left (b x + a\right )^{3}}{3 \, b} \]

[In]

integrate(sec(b*x+a)^4*sin(b*x+a)^2,x, algorithm="maxima")

[Out]

1/3*tan(b*x + a)^3/b

Giac [A] (verification not implemented)

none

Time = 0.34 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.87 \[ \int \sec ^2(a+b x) \tan ^2(a+b x) \, dx=\frac {\tan \left (b x + a\right )^{3}}{3 \, b} \]

[In]

integrate(sec(b*x+a)^4*sin(b*x+a)^2,x, algorithm="giac")

[Out]

1/3*tan(b*x + a)^3/b

Mupad [B] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.87 \[ \int \sec ^2(a+b x) \tan ^2(a+b x) \, dx=\frac {{\mathrm {tan}\left (a+b\,x\right )}^3}{3\,b} \]

[In]

int(sin(a + b*x)^2/cos(a + b*x)^4,x)

[Out]

tan(a + b*x)^3/(3*b)